package receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;

import com.qb.devtest.MyApplication;

public class BootReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        //MyUtil.showLog("BootReceiver", "BroadcastReceiver");
        Context ctx = MyApplication.getInstance();
        SharedPreferences SP = ctx.getSharedPreferences("dev_test_setting", ctx.MODE_PRIVATE);
        int boot_count = SP.getInt("BOOT_COUNT",0);
        boot_count = boot_count + 1;
        SharedPreferences.Editor edit = SP.edit();
        edit.putInt("BOOT_COUNT",boot_count);
        edit.apply();
    }
}
